<?php
namespace App\Listener;

use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Event\Annotation\Listener;

/**
 * @Listener 
 */
class UserMoneyPayMakeListener implements ListenerInterface
{
    public function listen(): array
    {
        return [
            \App\Event\UserPay\StatusOkEvent::class,
        ];
    }
    
    // 给用户封顶金额使用
    public function process($event)
    {
        $event->user->moneyPayMake($event->money);
    }
}